All Questions
10 questions
2votes
3answers
553views
Recursive palindrome check
I'm trying to solve this which basically calls for a recursive palindrome check with some minor extra steps (Special characters and whitespace can be ignored). The test inputs' length can be 100000 ...
1vote
0answers
372views
Codewars: Path Finder
Task You are at position [0, 0] in maze NxN and you can only move in one of the four cardinal directions (i.e. North, East, South, West). Return true if you can reach position [N-1, N-1] or false ...
3votes
1answer
567views
Find A Series of Numbers Who when Squared and Summed are equal to a given Square
I am working on a CodeWars titled 'Square into Squares. Protect trees!' it can be found here: https://www.codewars.com/kata/54eb33e5bc1a25440d000891/train/javascript I have a working solution, the ...
8votes
1answer
2kviews
Codewars: N-dimensional Von Neumann Neighborhood in a matrix
Task: For creating this challenge on Codewars I need a very performant function that calculates Von Neumann Neighborhood in a N-dimensional array. This function will be called about 2000 times The ...
4votes
1answer
1kviews
Recursive grid traveling algorithm
I'm trying to come up with a solution to a coding challenge on Kattis, where there is a 2D grid filled with x's and o's, and the goal is to figure out whether or not a given starting coordinate can ...
2votes
2answers
1kviews
Project Euler #15 in Python
I've wrote the code for Project Euler #15 and it runs amazingly fast. I know I can write it using binomials but I wanted to calculate by brute force as if I do not know Binomials. But I think it must ...
3votes
1answer
333views
Hand crafted longest common sub sequence
I know that the below solution is not the best one and I am in the way to learn that stuff till then I have applied the brute force to see how far I can go with my intuition. ...
8votes
1answer
2kviews
"Dungeon Game" solution
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially ...
3votes
2answers
2kviews
Recursive uniform cost search that needs to be optimized
I have this uniform cost search that I created to solve Project Euler Questions 18 and 67. It takes the numbers in the txt file, places them into a two dimensional list, and then traverses them in a ...
2votes
3answers
468views
Project Euler 28: sum of spiral diagonals using recursion
I've solved Project Euler #28 using recursion. If this 5 × 5 spiral pattern is extended to 1001 × 1001, what would be the sum of the red diagonals? $$\begin{matrix} \color{red}{21} & 22 &...